﻿Public Class CTEstadoPEJ

Private _PartidaEJ              As Long
Private _CantidadXDistrib       As Decimal 
Private _CantidadDistribuida    As Decimal
Private _EstatusDist            As enumEstatusPEJ
Private _lstDistribGL           As List(Of CTDistribucionGL)


Public Enum enumEstatusPEJ
  SIN_CONFIRMAR     = 0
  POR_DISTRIBUIR    = 1
  PARCIAL           = 2
  COMPLETA          = 3
  FUSIONADA         = 4  'se mantiene por posible funcionalidad futura
  CERRADA           = 5
  CANCELADA         = 6
End Enum




Public Sub new()   
   _lstDistribGL = New List(Of CTDistribucionGL)  
   _EstatusDist = enumEstatusPEJ.SIN_CONFIRMAR 
End Sub



Public Sub new(ByVal pPEJId As Long, _
               ByVal pXDistribuir As Decimal, _
               ByVal pDistribuida As Decimal, _
               ByVal pEstatusPEJ As enumEstatusPEJ _               
               )   

        _lstDistribGL = New List(Of CTDistribucionGL)             

        _PartidaEJ              = pPEJId
        _CantidadXDistrib       = pXDistribuir
        _CantidadDistribuida    = pDistribuida
        _EstatusDist            = pEstatusPEJ
        

End Sub

Public Sub new(ByVal pPEJId As Long, _
               ByVal pXDistribuir As Decimal, _
               ByVal pDistribuida As Decimal, _
               ByVal pEstatusPEJ As enumEstatusPEJ, _               
               ByRef pLstSistribGL As List(Of CTDistribucionGL)   )   

       

        _PartidaEJ              = pPEJId
        _CantidadXDistrib       = pXDistribuir
        _CantidadDistribuida    = pDistribuida
        _EstatusDist            = pEstatusPEJ        

        _lstDistribGL           = pLstSistribGL  

End Sub


Public Property PartidaEJ() As Long
    Get
        Return _PartidaEJ
    End Get
    Set(ByVal value As long)
        _PartidaEJ = value
    End Set
End Property

Public Property CantidadXDistrib() As Decimal
    Get
        Return _CantidadXDistrib 
    End Get
    Set(ByVal value As Decimal)
        _CantidadXDistrib = value
    End Set
End Property

Public Property CantidadDistribuida() As Decimal
    Get
        Return _CantidadDistribuida
    End Get
    Set(ByVal value As decimal)
        _CantidadDistribuida= value
    End Set
End Property

Public Property EstatusDist() As enumEstatusPEJ
    Get
        Return _EstatusDist
    End Get
    Set(ByVal value As enumEstatusPEJ)
        _EstatusDist = value
    End Set
End Property



Public Property lstDistribGL() As List(Of CTDistribucionGL)
    Get
        Return _lstDistribGL 
    End Get
    Set(ByVal value As List(Of CTDistribucionGL))
        _lstDistribGL = value
    End Set
End Property




End Class
